-
Notifications
You must be signed in to change notification settings - Fork 29.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
three: Fix ConstructorUnion's distributivity #62011
Conversation
Typescript 4.9 [optimises substitution types](https://github.com/microsoft/TypeScript/pull/50397a), but this exposes that ConstructorUnion isn't correctly distributive. I used the [fix suggested by Anders Hejslberg](microsoft/TypeScript#50397 (comment)) on the same PR.
@sandersn Thank you for submitting this PR! This is a live comment which I will keep updated. 1 package in this PR
Code ReviewsThis PR can be merged once it's reviewed by a DT maintainer. You can test the changes of this PR in the Playground. Status
Once every item on this list is checked, I'll ask you for permission to merge and publish the changes. Diagnostic Information: What the bot saw about this PR{
"type": "info",
"now": "-",
"pr_number": 62011,
"author": "sandersn",
"headCommitOid": "3a472370287de229f19b1e3c3195d235a6efd2c9",
"mergeBaseOid": "80216bd1ac48be44ac7bbc1cc26bbab1c9cc8a91",
"lastPushDate": "2022-08-29T17:15:50.000Z",
"lastActivityDate": "2022-08-29T17:22:12.000Z",
"hasMergeConflict": false,
"isFirstContribution": false,
"tooManyFiles": false,
"hugeChange": false,
"popularityLevel": "Popular",
"pkgInfo": [
{
"name": "three",
"kind": "edit",
"files": [
{
"path": "types/three/examples/jsm/nodes/shadernode/ShaderNode.d.ts",
"kind": "definition"
}
],
"owners": [
"joshuaellis",
"Methuselah96"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Popular"
}
],
"reviews": [
{
"type": "approved",
"reviewer": "joshuaellis",
"date": "2022-08-29T17:18:39.000Z",
"isMaintainer": false
}
],
"mainBotCommentID": 1230605458,
"ciResult": "pass"
} |
🔔 @joshuaellis @Methuselah96 — please review this PR in the next few days. Be sure to explicitly select |
Inspecting the JavaScript source for this package found some properties that are not in the .d.ts files. three (unpkg)was missing the following properties:
as well as these 5 other properties...LinearSRGBColorSpace, NoColorSpace, ParametricGeometry, SRGBColorSpace, TextGeometry |
Typescript 4.9 optimises substitution types, but this exposes that ConstructorUnion isn't correctly distributive.
I used the fix suggested by @ahejlsberg on the same PR.